<div class="modal" ng-controller="DocumentModalController" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" ng-click="$hide()" aria-hidden="true">×
                </button>
                <h5>New Vertex</h5>
            </div>
            <div ng-if="!selectClass">
                <div class="modal-body document">
                    <ng-include src="'views/database/record.html'">
                    </ng-include>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-sm pull-left" data-placement="right"
                            data-template="views/database/newFieldPopOver.html" bs-popover>Add Field
                    </button>
                    <button type="button" class="btn btn-sm" ng-click="$hide()">Close</button>
                    <button class="btn btn-primary btn-sm" ng-click="modal.saved=true;$hide();save()">Save changes
                    </button>
                </div>
            </div>
            <div ng-if="selectClass">
                <div class="modal-body document">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label class="control-label col-md-2">Class</label>

                            <div class="col-md-10">
                                <select ng-model="selectedClass" class="form-control"
                                        ng-options="p.toString() for p in listClasses">
                                    <option value=""></option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" ng-disabled="!selectedClass" class="btn btn-sm pull-right" ng-click="setSelectClass(selectedClass)"> Next
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>